window.onload = function () {

 var username=   document.getElementById('username');
 var messageBox = document.getElementById('message')
 username.onkeypress = usernameKeyDown;
 messageBox.onmouseenter = messageBoxEnter;
 messageBox.onmouseout=messageBoxOut;

}


function usernameKeyDown() {

    var message = document.getElementById('message');
    var username=   document.getElementById('username');

    message.innerText = username.value;


}

function messageBoxEnter() {

    var message = document.getElementById('message');

    message.innerText ='enter';
}

function  messageBoxOut(){
    var message = document.getElementById('message');

    message.innerText ='out';
}